home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today - The Disc! 8 / cdrt08.iso / mac / Shareware / HyperCard / demoCdef 120 ƒ / cdef3D source ƒ / test3D.r < prev   
Encoding:
Text File  |  1994-12-12  |  3.9 KB  |  111 lines  |  [TEXT/KAHL]

  1. //----------------------------------------------------------------------------------
  2. // File        : test3D.r
  3. // Date        : July 23, 1994
  4. // Author    : Jim Stout
  5. //            :
  6. // Purpose    : rez source for test3D.c
  7. //----------------------------------------------------------------------------------
  8. #include <Types.r> 
  9. include "debug.rsrc";            // contains the dummy CDEF 128
  10.  
  11. #define CDEF 128                // used in CNTL templates below
  12. #define wf 8
  13. #define WANT3D true                // set to false for normal buttons
  14.  
  15. // this resource will be set by test3D.c and used by the dummy CDEF
  16.  
  17. data 'CJMP' (128, "CDEFmain address") {
  18.     $"0000 0000"
  19. };
  20.  
  21. // this resource will color ALL controls (since it's id=0) in an application
  22.  
  23. resource 'cctb' (0) {
  24.     {
  25.         cBodyColor, 61166, 61166, 61166,
  26.         cTextColor, 0, 0, 0,
  27.         cFrameColor, 384, 384, 26214,
  28.     }
  29. };
  30.  
  31. // this resource will color dialog id=128 - and is needed to allow the 'cctb' to work
  32. // change wContentColor from white to see the control drawn as a "3D control".
  33.  
  34. resource 'dctb' (128) {
  35.     {    /* array ColorSpec: 5 elements */
  36. #if WANT3D
  37.         /* [1] */        wContentColor, 52428, 52428, 52428,        // gray background
  38. #else
  39.         /* [1] */        wContentColor, 65535, 65535, 65535,        // white background
  40. #endif
  41.         /* [2] */        wFrameColor, 0, 0, 0,
  42.         /* [3] */        wTextColor, 0, 0, 0,
  43.         /* [4] */        wHiliteColor, 0, 0, 0,
  44.         /* [5] */        wTitleBarColor, 65535, 65535, 65535
  45.     }
  46. };
  47.  
  48. resource 'DLOG' (128) {
  49.     {44, 20, 274, 440},    movableDBoxProc,    visible,    nogoAway,    0x0,    128,    "Test 3D CDEF"
  50. };
  51.  
  52. resource 'DITL' (128) {
  53.     {
  54.         /* [1] */    {197, 348, 217, 407},        Button        {    enabled,    "OK"            },
  55.         /* [2] */    {167, 348, 187, 407},        Button         {    enabled,    "Cancel"        },
  56.         /* [3] */    {15, 300, 31, 410},            StaticText    {    disabled,     "System CDEF"    },
  57.         /* [4] */    {40, 300, 56, 410},            CheckBox     {    enabled,    "CheckBox"        },
  58.         /* [5] */    {66, 300, 98, 410},            CheckBox     {    enabled,    "2 line\nTitle"    }, 
  59.         /* [6] */    {107, 300, 123, 410},        RadioButton {    enabled,    "RadioButton 1"    },
  60.         /* [7] */    {128, 300, 144, 410},        RadioButton {    enabled,    "RadioButton 2"    },
  61.     
  62.         /* [8] */    {197, 208, 217, 267},        Control        {    enabled,    128                },
  63.         /* [9] */    {167, 208, 187, 267},        Control     {    enabled,    129                },
  64.         /* [10] */    {15, 160, 31, 290},            StaticText    {    disabled,     "3D CDEF"    },
  65.         /* [11] */    {40, 160, 56, 290},            Control     {    enabled,    130                },
  66.         /* [12] */    {66, 160, 98, 290},            Control     {    enabled,    131                },
  67.         /* [13] */    {107, 160, 123, 290},        Control     {    enabled,    132                },
  68.         /* [14] */    {128, 160, 144, 290},        Control     {    enabled,    133                },
  69.         
  70.         /* [15] */    {15, 20, 31, 150},            StaticText    {    disabled,     "'Tog' Buttons"    },
  71.         /* [16] */    {40, 20, 56, 250},            Control        {    enabled,     134                },
  72.         /* [17] */    {61, 20, 77, 250},            Control        {    enabled,     135                },
  73.         /* [18] */    {82, 20, 98, 250},            Control        {    enabled,     136                },
  74.         /* [19] */    {103, 20, 119, 250},        Control        {    enabled,     137                }
  75.     }
  76. };
  77.  
  78. // make sure the RECTs for the CNTL resources match the DITL rects above or your your
  79. // dialog will 'flash' when it is drawn.
  80.  
  81. resource 'CNTL' (128) {
  82.     {197, 208, 217, 267},0,    visible,    1,        0,    16*CDEF+pushButProc+wf,        0,    "OK"
  83. };
  84. resource 'CNTL' (129) {
  85.     {167, 208, 187, 267},0,    visible,    1,        0,    16*CDEF+pushButProc+wf,        0,    "Cancel"
  86. };
  87. resource 'CNTL' (130) {
  88.     {40, 160, 56, 290},    0,    visible,    1,        0,    16*CDEF+checkBoxProc+wf,    0,    "CheckBox"
  89. };
  90. resource 'CNTL' (131) {
  91.     {66, 160, 98, 290},    0,    visible,    1,        0,    16*CDEF+checkBoxProc+wf,    0,    "2 line\nTitle"
  92. };
  93. resource 'CNTL' (132) {
  94.     {107, 160, 123, 290},1,    visible,    1,        0,    16*CDEF+radioButProc+wf,    0,    "RadioButton 1"
  95. };
  96. resource 'CNTL' (133) {
  97.     {128, 160, 144, 290},0,    visible,    1,        0,    16*CDEF+radioButProc+wf,    0,    "RadioButton 2"
  98. };
  99.  
  100. resource 'CNTL' (134) {
  101.     {40, 20, 56, 250},1,    visible,    1,        0,    16*CDEF+4+wf,                0,    "Tog Button 1"
  102. };
  103. resource 'CNTL' (135) {
  104.     {61, 20, 77, 250},0,    visible,    1,        0,    16*CDEF+4+wf,                0,    "Tog Button 2"
  105. };
  106. resource 'CNTL' (136) {
  107.     {82, 20, 98, 250},0,    visible,    1,        0,    16*CDEF+4+wf,                0,    "Tog Button 3"
  108. };
  109. resource 'CNTL' (137) {
  110.     {103, 20, 119, 250},0,    visible,    1,        0,    16*CDEF+4+wf,                0,    "Tog Button 4"
  111. };